package com.chat.admin.annotate;

import com.chat.admin.common.validation.AccountValidator;
import jakarta.validation.Constraint;
import jakarta.validation.Payload;

import java.lang.annotation.*;

@Documented
@Constraint(validatedBy = AccountValidator.class)
@Target({ElementType.METHOD, ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface ValidAccount {
    String message() default "账号只能是数字，且长度必须在指定的范围内";
    Class<?>[] groups() default {};
    Class<? extends Payload>[] payload() default {};
    int min() default 6;
    int max() default 11;
}